import axios from '~/axios'

// 添加交易申请发票
export function addTradeApplicationInvoiceApi(data) {
    return axios.post('/basic/lindi/tradeApplicationInvoice/addTradeApplicationInvoice', data)
}

// 删除交易申请发票
export function deleteTradeApplicationInvoiceByTradeApplicationInvoiceIdApi(tradeApplicationInvoiceId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/tradeApplicationInvoice/deleteTradeApplicationInvoiceByTradeApplicationInvoiceId',
        params: {
            tradeApplicationInvoiceId: tradeApplicationInvoiceId
        }
    })
}

// 修改交易申请发票
export function updateTradeApplicationInvoiceByTradeApplicationInvoiceIdApi(data) {
    return axios.put('/basic/lindi/tradeApplicationInvoice/updateTradeApplicationInvoiceByTradeApplicationInvoiceId', data)
}

// 分页查询交易申请发票列表
export function getPageTradeApplicationInvoiceListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/tradeApplicationInvoice/getPageTradeApplicationInvoiceList',
        params: params
    })
}

// 根据ID查询交易申请发票详情
export function getTradeApplicationInvoiceByTradeApplicationInvoiceIdApi(tradeApplicationInvoiceId) {
    return axios.get(`/basic/lindi/tradeApplicationInvoice/getTradeApplicationInvoiceByTradeApplicationInvoiceId/${tradeApplicationInvoiceId}`)
}

// 根据交易申请ID查询发票列表
export function getTradeApplicationInvoiceListByTradeApplicationIdApi(tradeApplicationId) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/tradeApplicationInvoice/getTradeApplicationInvoiceListByTradeApplicationId',
        params: {
            tradeApplicationId
        }
    })
}